Skip to content

[BackPort] fix: remove output fields subsumed by primitiveVars to prevent duplic…#1951

Merged
benflexcompute merged 1 commit intorelease-candidate/25.6from
hotfix/25.6-fix-duplicate-primitiveVars-output
Apr 3, 2026
Merged

[BackPort] fix: remove output fields subsumed by primitiveVars to prevent duplic…#1951
benflexcompute merged 1 commit intorelease-candidate/25.6from
hotfix/25.6-fix-duplicate-primitiveVars-output

Conversation

@NasserFlexCompute
Copy link
Copy Markdown
Contributor

@NasserFlexCompute NasserFlexCompute commented Apr 2, 2026

…… (#1948)


Note

Medium Risk
Changes solver output field translation so requested fields are silently removed in some configurations, which could affect downstream post-processing expectations. Scope is limited to output-field list generation and is covered by updated/added tests.

Overview
Prevents duplicate VTK DataArray names when users request primitiveVars alongside pressure and/or velocity (a combination that can break ParaView when loading subsets of fields).

Adds remove_fields_subsumed_by_primitive_vars() and applies it during output translation (surface/slice/probe/volume) so pressure/velocity are dropped when primitiveVars is present, while keeping auto-appended fields like velocity_magnitude. Tests are added/updated to assert the new deduped outputFields behavior.

Written by Cursor Bugbot for commit c24c285. This will update automatically on new commits. Configure here.

Copilot AI review requested due to automatic review settings April 2, 2026 18:19
@benflexcompute benflexcompute changed the title fix: remove output fields subsumed by primitiveVars to prevent duplic… [BackPort] fix: remove output fields subsumed by primitiveVars to prevent duplic… Apr 2, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adjusts the simulation-to-solver JSON translation of outputFields to avoid generating duplicate VTK DataArray names when primitiveVars is requested alongside pressure and/or velocity, which can break ParaView field-subset loading.

Changes:

  • Added remove_fields_subsumed_by_primitive_vars() to drop pressure/velocity when primitiveVars is present.
  • Applied the new deduplication during translation for both per-entity outputs and volume outputs.
  • Updated/added unit tests to reflect and validate the new behavior (notably removing velocity from expected translated outputFields where primitiveVars is present).

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
flow360/component/simulation/outputs/output_fields.py Introduces helper to remove pressure/velocity when subsumed by primitiveVars.
flow360/component/simulation/translator/solver_translator.py Applies the helper during output-field translation to prevent duplicate VTK array names.
tests/simulation/outputs/test_output_fields.py Adds unit tests covering the new helper’s behavior.
tests/simulation/translator/test_output_translation.py Updates translation expectations (removes velocity where primitiveVars is present).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@benflexcompute benflexcompute enabled auto-merge (squash) April 2, 2026 23:27
@benflexcompute benflexcompute disabled auto-merge April 3, 2026 13:20
@benflexcompute benflexcompute enabled auto-merge (squash) April 3, 2026 14:03
auto-merge was automatically disabled April 3, 2026 14:04

Pull request was closed

@benflexcompute benflexcompute reopened this Apr 3, 2026
@benflexcompute
Copy link
Copy Markdown
Collaborator

I will fix this.

@benflexcompute benflexcompute enabled auto-merge (squash) April 3, 2026 19:47
@benflexcompute benflexcompute merged commit c3af3b3 into release-candidate/25.6 Apr 3, 2026
115 of 126 checks passed
@benflexcompute benflexcompute deleted the hotfix/25.6-fix-duplicate-primitiveVars-output branch April 3, 2026 19:47
github-actions bot pushed a commit that referenced this pull request Apr 3, 2026
github-actions bot pushed a commit that referenced this pull request Apr 3, 2026
github-actions bot pushed a commit that referenced this pull request Apr 3, 2026
github-actions bot pushed a commit that referenced this pull request Apr 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants